How to open a text file in editor using Python